package com.diligent.cloud.printer.server.resource;

import com.canny.commons.model.Result;
import com.diligent.cloud.printer.server.service.PrinterServerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Description:
 * @Author: xf107397
 * @Date: Create：in 2020-06-20:15:09
 * @Modified By：
 */
@RestController
public class PrinterServerResourceImpl implements PrinterServerResource {

    @Autowired
    private PrinterServerService printerServerService;
    @Override
    public ResponseEntity<Result> printFile(MultipartFile file,String printerName) {
        return printerServerService.printFile(file,printerName);
    }

    @Override
    public ResponseEntity<Result> addPrinter(String printerName,String printerUrl, MultipartFile ppdFile) {
        return printerServerService.addPrinter(printerName,printerUrl,ppdFile);
    }
}
